extends Node

const fixDef = 0.5
const fixDefDuck = 1.0
const fixDexCrit = 1.0
const fixCrit = 2
const fixDuck = 0.5

const chaGold = 67

const itemGradeColors = ["#efefef", "#62b6f0", "#d262f0", "#f0e862"]
const itemGradeStrs = ["普通", "精良", "卓越", "史诗", "传说"]

enum {EQUITYPE_EQUI, EQUIETYPE_PASS}

const attKeys = ["maxHp", "atk", "def", "mgiAtk", "mgiDef", "pen", "mgiPen", "atkRan", "air", "dod", "cri", "criR", "suck", "mgiSuck", "reHp", "spd", "cd", "reHpM", "atkR", "defR", "maxHpL", "atkL", "defL", "mgiAtkL", "mgiDefL", "penL", "mgiPenL", "healHpL", "airL"]

const attStrs = ["最大耐久", "炮击", "护甲", "雷击", "魔法防御", "护甲穿透", "护甲穿透", "射程", "航空", "机动", "暴击", "爆伤", "吸血", "魔法吸血", "承疗", 
"主炮射速", "冷却速度", "释放治疗效果", "伤害加成", "减伤加成", "最大耐久", "炮击", "护甲", "雷击", "魔法防御", "护甲穿透", "护甲穿透", "治疗效果", "航空"
]

var bfDir = {
	
}

var attRds = {
	maxHpL = "maxHp",
	defL = "def",
	atkL = "atk", 
	mgiAtkL = "mgiAtk",
	airL = "air"
}

var attRdsKeys = attRds.keys()
var attRdsVals = attRds.values()

var aroundCells = [Vector2(-1,0),Vector2(1,0),Vector2(0,1),Vector2(0,-1),Vector2(1,1),Vector2(-1,-1),Vector2(1,-1),Vector2(-1,1)]
var aroundCellEx = [Vector2(0,0), Vector2(-1,0),Vector2(1,0),Vector2(0,1),Vector2(0,-1),Vector2(1,1),Vector2(-1,-1),Vector2(1,-1),Vector2(-1,1)]

func reinit():
	attRds = {
		maxHpL = "maxHp",
		defL = "def",
		atkL = "atk", 
		mgiAtkL = "mgiAtk",
		airL = "air"
	}
	attRdsKeys = attRds.keys()
	attRdsVals = attRds.values()

const defaultMoveSpd = 300